﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DomainModel;
using DataProvider;
using DataAccess;

namespace BussinessLogic
{
    public class AdminManager
    {
        private readonly IAdminProvider Provider = new AdminAccess();

        public void CreateNewManager(Admin manager)
        {
            Provider.CreateAdmin(manager);
        }

        public IEnumerable<Admin> GetAllManagers()
        {
            return Provider.GetAllManagers();
        }

        public Admin GetManagerByID(int id)
        {
            return Provider.GetManagerByID(id);
        }

        public void DeleteManagerByID(int id)
        {
            Provider.DeleteAdmin(id);
        }

        public void UpdateAdmin(Admin managerToUpdae)
        {
            Provider.UpdateAdmin(managerToUpdae);
        }

        public void UpdateSiteConfig(SiteConfig config)
        {
            Provider.UpdateSiteConfig(config);
        }
    } 
}
